home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_i.lzh / intuition / gadgetclass.i < prev    next >
Text File  |  1991-03-14  |  7KB  |  252 lines

  1.     IFND INTUITION_GADGETCLASS_I
  2. INTUITION_GADGETCLASS_I SET 1
  3. **
  4. ** $Filename: intuition/gadgetclass.i $
  5. ** $Release: 2.04 $
  6. ** $Revision: 36.8 $
  7. ** $Date: 91/02/22 $
  8. **
  9. ** Custom and 'boopsi' gadget class interface
  10. **
  11. **  (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.     IFND EXEC_TYPES_I
  16.     INCLUDE "exec/types.i"
  17.     ENDC
  18.  
  19.     IFND INTUITION_INTUITION_I
  20.     INCLUDE "intuition/intuition.i"
  21.     ENDC
  22.  
  23.     IFND UTILITY_TAGITEM_I
  24.     INCLUDE "utility/tagitem.i"
  25.     ENDC
  26.  
  27.  
  28. *
  29. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  30. *
  31.  
  32. ; Gadget Class attributes
  33.  
  34. GA_Dummy        EQU    (TAG_USER+$30000)
  35. GA_Left            EQU    (GA_Dummy+$0001)
  36. GA_RelRight        EQU    (GA_Dummy+$0002)
  37. GA_Top            EQU    (GA_Dummy+$0003)
  38. GA_RelBottom        EQU    (GA_Dummy+$0004)
  39. GA_Width        EQU    (GA_Dummy+$0005)
  40. GA_RelWidth        EQU    (GA_Dummy+$0006)
  41. GA_Height        EQU    (GA_Dummy+$0007)
  42. GA_RelHeight        EQU    (GA_Dummy+$0008)
  43. GA_Text            EQU    (GA_Dummy+$0009)  ; ti_Data is (UBYTE *)
  44. GA_Image        EQU    (GA_Dummy+$000A)
  45. GA_Border        EQU    (GA_Dummy+$000B)
  46. GA_SelectRender        EQU    (GA_Dummy+$000C)
  47. GA_Highlight        EQU    (GA_Dummy+$000D)
  48. GA_Disabled        EQU    (GA_Dummy+$000E)
  49. GA_GZZGadget        EQU    (GA_Dummy+$000F)
  50. GA_ID            EQU    (GA_Dummy+$0010)
  51. GA_UserData        EQU    (GA_Dummy+$0011)
  52. GA_SpecialInfo        EQU    (GA_Dummy+$0012)
  53. GA_Selected        EQU    (GA_Dummy+$0013)
  54. GA_EndGadget        EQU    (GA_Dummy+$0014)
  55. GA_Immediate        EQU    (GA_Dummy+$0015)
  56. GA_RelVerify        EQU    (GA_Dummy+$0016)
  57. GA_FollowMouse        EQU    (GA_Dummy+$0017)
  58. GA_RightBorder        EQU    (GA_Dummy+$0018)
  59. GA_LeftBorder        EQU    (GA_Dummy+$0019)
  60. GA_TopBorder        EQU    (GA_Dummy+$001A)
  61. GA_BottomBorder        EQU    (GA_Dummy+$001B)
  62. GA_ToggleSelect        EQU    (GA_Dummy+$001C)
  63.  
  64. * internal use only, until further notice, please
  65. GA_SysGadget        EQU    (GA_Dummy+$001D)
  66. * bool, sets GTYP_SYSGADGET field in type
  67. GA_SysGType        EQU    (GA_Dummy+$001E)
  68. * e.g., GTYP_WUPFRONT, ...
  69.  
  70. GA_Previous        EQU    (GA_Dummy+$001F)
  71. * previous gadget (or (struct Gadget **)) in linked list
  72. * NOTE: This attribute CANNOT be used to link new gadgets
  73. * into the gadget list of an open window or requester.
  74. * You must use AddGList().
  75.  
  76. GA_Next            EQU    (GA_Dummy+$0020)
  77. * not implemented
  78.  
  79. GA_DrawInfo        EQU    (GA_Dummy+$0021)
  80. * some fancy gadgets need to see a DrawInfo
  81. * when created or for layout
  82.  
  83. * You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage
  84. GA_IntuiText        EQU    (GA_Dummy+$0022)
  85. * ti_Data is (struct IntuiText    *)
  86.  
  87. GA_LabelImage        EQU    (GA_Dummy+$0023)
  88. * ti_Data is an image (object), used in place of
  89. * GadgetText
  90.  
  91. GA_TabCycle        EQU    (GA_Dummy+$0024)
  92. * New for V37:
  93. * Boolean indicates that this gadget is to participate in
  94. * cycling activation with Tab or Shift-Tab.
  95.  
  96. * PROPGCLASS attributes
  97.  
  98. PGA_Dummy        EQU    (TAG_USER+$31000)
  99. PGA_Freedom        EQU    (PGA_Dummy+$0001)
  100. * either or both of FREEVERT and FREEHORIZ
  101. PGA_Borderless        EQU    (PGA_Dummy+$0002)
  102. PGA_HorizPot        EQU    (PGA_Dummy+$0003)
  103. PGA_HorizBody        EQU    (PGA_Dummy+$0004)
  104. PGA_VertPot        EQU    (PGA_Dummy+$0005)
  105. PGA_VertBody        EQU    (PGA_Dummy+$0006)
  106. PGA_Total        EQU    (PGA_Dummy+$0007)
  107. PGA_Visible        EQU    (PGA_Dummy+$0008)
  108. PGA_Top            EQU    (PGA_Dummy+$0009)
  109. ; New for V37:
  110. PGA_NewLook        EQU    (PGA_Dummy+$000A)
  111.  
  112. * STRGCLASS attributes
  113.  
  114. STRINGA_Dummy            EQU    (TAG_USER+$32000)
  115. STRINGA_MaxChars    EQU    (STRINGA_Dummy+$0001)
  116. STRINGA_Buffer        EQU    (STRINGA_Dummy+$0002)
  117. STRINGA_UndoBuffer    EQU    (STRINGA_Dummy+$0003)
  118. STRINGA_WorkBuffer    EQU    (STRINGA_Dummy+$0004)
  119. STRINGA_BufferPos    EQU    (STRINGA_Dummy+$0005)
  120. STRINGA_DispPos        EQU    (STRINGA_Dummy+$0006)
  121. STRINGA_AltKeyMap    EQU    (STRINGA_Dummy+$0007)
  122. STRINGA_Font        EQU    (STRINGA_Dummy+$0008)
  123. STRINGA_Pens        EQU    (STRINGA_Dummy+$0009)
  124. STRINGA_ActivePens    EQU    (STRINGA_Dummy+$000A)
  125. STRINGA_EditHook    EQU    (STRINGA_Dummy+$000B)
  126. STRINGA_EditModes    EQU    (STRINGA_Dummy+$000C)
  127.  
  128. * booleans
  129. STRINGA_ReplaceMode    EQU    (STRINGA_Dummy+$000D)
  130. STRINGA_FixedFieldMode    EQU    (STRINGA_Dummy+$000E)
  131. STRINGA_NoFilterMode    EQU    (STRINGA_Dummy+$000F)
  132.  
  133. STRINGA_Justification    EQU    (STRINGA_Dummy+$0010)
  134. * GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT
  135. STRINGA_LongVal        EQU    (STRINGA_Dummy+$0011)
  136. STRINGA_TextVal        EQU    (STRINGA_Dummy+$0012)
  137.  
  138. STRINGA_ExitHelp    EQU    (STRINGA_Dummy+$0013)
  139. * STRINGA_ExitHelp is new for V37, and ignored by V36.
  140. * Set this if you want the gadget to exit when Help is
  141. * pressed.  Look for a code of 0x5F, the rawkey code for Help
  142.  
  143. SG_DEFAULTMAXCHARS    EQU    (128)
  144.  
  145. * Gadget Layout related attributes
  146.  
  147. LAYOUTA_Dummy        EQU    (TAG_USER+$38000)
  148. LAYOUTA_LayoutObj    EQU    (LAYOUTA_Dummy+$0001)
  149. LAYOUTA_Spacing        EQU    (LAYOUTA_Dummy+$0002)
  150. LAYOUTA_Orientation    EQU    (LAYOUTA_Dummy+$0003)
  151.  
  152. * orientation values
  153. LORIENT_NONE        EQU    0
  154. LORIENT_HORIZ        EQU    1
  155. LORIENT_VERT        EQU    2
  156.  
  157. ; Custom gadget hook command ID's 
  158. ; (gadget class method/message ID's)
  159.  
  160. GM_HITTEST EQU        0    ; return GMR_GADGETHIT if you are clicked
  161.                 ; (whether or not you are disabled)
  162. GM_RENDER EQU        1    ; draw yourself, in the appropriate state
  163. GM_GOACTIVE EQU        2    ; you are now going to be fed input
  164. GM_HANDLEINPUT EQU    3    ; handle that input
  165. GM_GOINACTIVE EQU    4    ; whether or not by choice, you are done
  166.  
  167. ; Parameter "Messages" passed to gadget class methods
  168.  
  169. ; All parameter structure begin with a MethodID field
  170. ; This definition of an abstract generic "message" is
  171. ; equivalent to a better one in intuition/classusr.i, but
  172. ; it's left here for historic reasons
  173.  STRUCTURE MsgHeader,0
  174.     ULONG    MethodID
  175.     LABEL    methodid_SIZEOF
  176.  
  177. ; GM_HITTEST
  178.  STRUCTURE    gpHitTest,methodid_SIZEOF
  179.     APTR    gpht_GInfo
  180.     WORD    gpht_MouseX
  181.     WORD    gpht_MouseY
  182.  
  183. ; GM_HITTEST return value
  184. GMR_GADGETHIT    EQU $00000004    ; if no hit, return 0
  185.  
  186. ; GM_RENDER
  187.  STRUCTURE    gpRender,methodid_SIZEOF
  188.     APTR    gpr_GInfo    ; gadget context
  189.     APTR    gpr_RPort    ; all ready for use
  190.     LONG    gpr_Redraw    ; might be a "highlight pass"
  191.  
  192. ; values of gpr_Redraw
  193. GREDRAW_UPDATE    EQU 2    ; update for change in attributesvalues
  194. GREDRAW_REDRAW    EQU 1    ; redraw gadget
  195. GREDRAW_TOGGLE    EQU 0    ; toggle highlight, if applicable
  196.  
  197. ; GM_GOACTIVE, GM_HANDLEINPUT
  198.  STRUCTURE    gpInput,methodid_SIZEOF
  199.     APTR    gpi_GInfo;
  200.     APTR    gpi_IEvent;
  201.     APTR    gpi_Termination;
  202.     WORD    gpi_MouseX
  203.     WORD    gpi_MouseY
  204.  
  205. ; GM_HANDLEINPUT and GM_GOACTIVE  return code flags
  206. ; return GMR_MEACTIVE (0) alone if you want more input.
  207. ; Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
  208. ; GMR_VERIFY.
  209.  
  210. ; here are the original constant "equates"
  211. GMR_MEACTIVE    EQU $0000     ; (bugfix: was $0001 during beta)
  212. GMR_NOREUSE    EQU $0002
  213. GMR_REUSE    EQU $0004
  214. GMR_VERIFY    EQU $0008    ; you MUST set cgp_Termination
  215.  
  216. * New for V37:
  217. * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
  218. * which instructs Intuition to activate the next or previous gadget
  219. * that has GFLG_TABCYCLE set.
  220. *
  221. GMR_NEXTACTIVE    EQU $0010
  222. GMR_PREVACTIVE    EQU $0020
  223.  
  224. ; here are standard bit/flag pairs
  225. GMRB_NOREUSE    EQU 1
  226. GMRB_REUSE    EQU 2
  227. GMRB_VERIFY    EQU 3
  228. GMRB_NEXTACTIVE    EQU 4
  229. GMRB_PREVACTIVE    EQU 5
  230.  
  231. GMRF_NOREUSE    EQU $0002
  232. GMRF_REUSE    EQU $0004
  233. GMRF_VERIFY    EQU $0008
  234. GMRF_NEXTACTIVE    EQU $0010
  235. GMRF_PREVACTIVE    EQU $0020
  236.  
  237. ; GM_GOINACTIVE
  238.  STRUCTURE    gpGoInactive,methodid_SIZEOF
  239.     APTR    gpgi_GInfo;
  240.  
  241. * V37 field only!  DO NOT attempt to read under V36!
  242.     ULONG    gpgi_Abort;    ; gpgi_Abort=1 if gadget was aborted
  243.                 ; by Intuition and 0 if gadget went
  244.                 ; inactive at its own request
  245.  
  246. * Include obsolete identifiers:
  247.     IFND    INTUITION_IOBSOLETE_I
  248.     INCLUDE "intuition/iobsolete.i"
  249.     ENDC
  250.  
  251.     ENDC
  252.